import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

class ArticleDetailsScreen extends StatelessWidget {
  final WebViewController _controller = WebViewController();
  late final String _title;
  ArticleDetailsScreen({super.key,required String title,required String url}){
    _title = title;
    _controller.setJavaScriptMode(JavaScriptMode.unrestricted);
    _controller.loadRequest(Uri.parse(url));

  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(_title)),
      body: WebViewWidget(controller: _controller),
    );
  }
}
